﻿package mortal.component.gconst
{
    import flash.filters.*;
    import flash.utils.*;

    public class FilterConst extends Object
    {
        private static var _textColorFilters:Dictionary = new Dictionary();
        private static var _glowColorFilters:Dictionary = new Dictionary();
        public static const windowTextFilter:DropShadowFilter = new DropShadowFilter(2, 90, 0, 0.5, 0, 0, 0.9);
        public static const glowFilter:GlowFilter = new GlowFilter(595746, 1, 2, 2, 10);
        public static const titleFilter:GlowFilter = new GlowFilter(0, 0.4, 1, 1, 50);
        public static const titleShadowFilter:DropShadowFilter = new DropShadowFilter(2, 90, 0, 0.5, 5, 5);
        public static const titleGradientBevelFilter:GradientBevelFilter = new GradientBevelFilter(2, 90, [16751616, 13948116, 16777131], [1, 0, 1], [0, 128, 255], 5, 5, 1.95, 1);
        public static const nameGlowFilter:GlowFilter = new GlowFilter(5143, 1, 2, 2, 10);
        public static const vipNameGlowFilter:GlowFilter = new GlowFilter(6423299, 1, 2, 2, 10);
        public static const buttonDropShadowFilter:DropShadowFilter = new DropShadowFilter(1, 90, 4473924, 0.75);
        public static const buttonGlowFilter:GlowFilter = new GlowFilter(2625038, 1, 2, 2, 10);
        public static const fightTextFilter:GlowFilter = new GlowFilter(16777215, 1, 1, 1, 1, 1, false, false);
        public static const redTipsFilter:GlowFilter = new GlowFilter(14623009, 1, 10, 10, 2);
        public static const yellowTipsFilter:GlowFilter = new GlowFilter(16776960, 1, 10, 10, 2);
        public static const guideTipsFilter:GlowFilter = new GlowFilter(16776960, 1, 10, 10, 2);
        public static const guideTaskFilter:GlowFilter = new GlowFilter(16776960, 1, 4, 4, 1.5);
        public static const taskShowTargetFilter:GlowFilter = new GlowFilter(16711935, 1, 10, 10, 4, 10);
        public static const itemChooseFilter:GlowFilter = new GlowFilter(65280);
        public static const chatTipsFilter:GlowFilter = new GlowFilter(16776960, 1, 4, 4, 2, 1, false);
        public static const fashionOnlineFilter:GlowFilter = new GlowFilter(16448769, 1, 10, 10, 2);
        public static const hintIconFilter:GlowFilter = new GlowFilter(268435302, 1, 3, 2, 3);
        public static const noticeItemFilter:GlowFilter = new GlowFilter(47765, 0.6, 15, 15, 2, 1);
        public static const noticeItemFilter2:GlowFilter = new GlowFilter(2236962, 1, 2, 2, 10);
        public static const sceneDesFilter:GlowFilter = new GlowFilter(26367, 0.6, 5, 5, 3, 10);
        public static const plotShowFilter:DropShadowFilter = new DropShadowFilter(2, 45, 0);
        public static const plotShowFilter2:GlowFilter = new GlowFilter(0, 1, 2, 2, 4);
        public static const rollTipsFilter:GlowFilter = new GlowFilter(0, 1, 2, 2, 2);
        public static const rollTipsFilter2:DropShadowFilter = new DropShadowFilter(1, 45, 47765, 1);
        public static const crossGuildWarStageBtnFilter:GlowFilter = new GlowFilter(12989191, 0.9, 8, 8, 3);
        public static const alertDropShadowFilter:DropShadowFilter = new DropShadowFilter(1, 90, 0, 0.6, 12);
        public static const alertGlowFilter:GlowFilter = new GlowFilter(16777215, 0.8, 15, 15, 0.7, 3, true);
        public static const guideFilter:GlowFilter = new GlowFilter(16776960, 1, 2, 2, 10);
        public static const NpcNameFilter:DropShadowFilter = new DropShadowFilter(0, 120, 14599683, 0.8, 3, 3, 1);
        public static const NpcTalkFilter:DropShadowFilter = new DropShadowFilter(0, 120, 14865853, 0.8, 2, 2, 0.9);
        public static const guildTaskFilter:GlowFilter = new GlowFilter(65535, 0.8, 4, 4, 2, 1);
        public static const RollFilter:BlurFilter = new BlurFilter(0, 10);
        public static const colorFilter:ColorMatrixFilter = new ColorMatrixFilter([0.31, 0.61, 0.08, 0, 0, 0.31, 0.61, 0.08, 0, 0, 0.31, 0.61, 0.08, 0, 0, 0, 0, 0, 1, 0]);
        public static const colorFilter2:ColorMatrixFilter = new ColorMatrixFilter([0.5086, 0.2094, 0.082, 0, 0, 0.5086, 0.2094, 0.082, 0, 0, 0.5086, 0.2094, 0.082, 0, 0, 0, 0, 0, 1, 0]);
        public static const colorFilter3:ColorMatrixFilter = new ColorMatrixFilter([0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0, 0, 0, 1, 0]);
        public static const colorFilterRed:ColorMatrixFilter = new ColorMatrixFilter([0.5, 0.5, 1, 0, 0, 0.2, 0.2, 0.2, 0, 0, 0.2, 0.2, 0.2, 0, 0, 0, 0, 0, 1, 0]);
        public static const gradientGlowFilter:GradientGlowFilter = new GradientGlowFilter(0, 45, [16777062, 16776960], [0, 1], [0, 255], 5, 5, 2, BitmapFilterQuality.HIGH, BitmapFilterType.OUTER);

        public function FilterConst()
        {
            return;
        }// end function

        public static function textStrokeFilter(param1:uint = 0) : GlowFilter
        {
            if (!_textColorFilters.hasOwnProperty(param1))
            {
                _textColorFilters[param1] = new GlowFilter(param1, 1, 2, 2, 50, 1, false, false);
            }
            return _textColorFilters[param1];
        }// end function

        public static function colorGlowFilter(param1:uint = 0) : GlowFilter
        {
            if (!_glowColorFilters.hasOwnProperty(param1))
            {
                _glowColorFilters[param1] = new GlowFilter(param1, 1, 10, 10, 2);
            }
            return _glowColorFilters[param1];
        }// end function

    }
}
